001 package EVolve.data; 002 003 public interface Worker { 004 public static final int STATE_NOT_STARTED = 0; 005 public static final int STATE_RUNNING = 1; 006 public static final int STATE_PAUSING = 2; 007 public static final int STATE_PAUSED = 3; 008 public static final int STATE_STOPPING = 4; 009 public static final int STATE_STOPPED = 4; 010 public static final int STATE_FINISHED = 5; 011 012 public void pause(); 013 public void resume(); 014 public void stop(); 015 public long getCurrentProgress(); 016 public long getMaxProgress(); 017 public int getCurrentState(); 018 public void resetState(); 019 020 public void start(); 021 public void join() throws InterruptedException; 022 }